import { createApp } from 'vue'

import '/src/assets/common.css'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// pinia
import pinia from '@/stores/index'

// element-plus
import { ElTable, ElTableColumn } from 'element-plus'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
// 全局el-table设置
ElTable.props.border = { type: Boolean, default: true } // 边框线
ElTable.props.stripe = { type: Boolean, default: true }
// TableProps.tooltipOptions = { type: Object, default: {trigger: "click"} }
// 全局el-table-column设置
ElTableColumn.props.align = { type: String, default: 'center' } // 居中
ElTableColumn.props.showOverflowTooltip = { type: Boolean, default: true } // 文本溢出

// vxe表格
import VXETable from 'vxe-table'
import 'vxe-table/lib/style.css'
// 右键菜单
import ContextMenu from '@imengyu/vue3-context-menu'
import '@imengyu/vue3-context-menu/lib/vue3-context-menu.css'
// 动画css
import "animate.css/animate.min.css"
// hook
import { validateDirective } from "@/hooks/validateDirective"
// dataV
import DataVVue3 from '@kjgl77/datav-vue3'
// echarts
// import "echarts"
// import * as echarts from 'echarts'
// wujie
// import Wujie from 'wujie-vue3'

// vue3-drr-grid-layout
import GridLayout from 'vue3-grid-layout-next'
import 'vue3-grid-layout-next/dist/style.css'

import router from './router'
import App from './App.vue'

const app = createApp(App)

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

app.directive('validate', validateDirective)
app.use(pinia)
app.use(router)
app.use(ElementPlus)
app.use(VXETable)
app.use(ContextMenu)
app.use(DataVVue3)
app.use(GridLayout)
// app.use(Wujie)

app.mount('#app')
